package com.niiwoo.civet.trade.dto;

import java.math.BigDecimal;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 标的还款总金额对象
 *
 * @author: kevin.jia
 * @version 1.0.0
 */
@Getter
@Setter
@ToString
public class ProjectRepayTotalAmountDTO {
	
	/** 总本金 */
	private BigDecimal totalCapital;
	
	/** 总利息 */
	private BigDecimal totalInterest;
	
	/** 总罚息 */
	private BigDecimal totalPenaltyFee;
	
	/** 总平台管理费 */
	private BigDecimal totalManagementFee;
	
	/** 总担保服务费 */
	private BigDecimal totalGuaranteeFee;
	
	/** 应还总金额 */
	private BigDecimal totalAmount;
	
	public BigDecimal getTotalAmount() {
		totalAmount = totalCapital.add(totalInterest).add(totalPenaltyFee).add(totalManagementFee).add(totalGuaranteeFee);
		
		return totalAmount;
	}
	
	/**
	 * 默认设置所以费用初始值为0
	 */
	public ProjectRepayTotalAmountDTO() {
		this.totalCapital = BigDecimal.ZERO;
		this.totalInterest = BigDecimal.ZERO;
		this.totalPenaltyFee = BigDecimal.ZERO;
		this.totalManagementFee = BigDecimal.ZERO;
		this.totalGuaranteeFee = BigDecimal.ZERO;
		
		this.totalAmount = BigDecimal.ZERO;
	}
}
